with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Horloge is
   type Hour is new  Integer range 0..23;
   type Minute is new Integer range 0..59;
   type Seconds is new Integer range 0..59;
   H : Hour;
   M : Minute;
   S : Seconds;


begin
   Put("Heure :");
   H := Hour'Value(Get_Line);
   New_Line;
   Put("Minute :");
   M := Minute'Value(Get_Line);
   New_Line;
   Put("Seconde :");
   S := Seconds'Value(Get_Line);
   Put("Il est ");
   Put(Hour'Image(H));
   Put("h, ");
   Put(Minute'Image(M));
   Put("mn, ");
   Put(Seconds'Image(S));
   Put("sec .");
   New_Line;
   -- next second
   if S < 59 then
      S := S + 1;
   else
      S := 00 ;
      if M < 59 then
         M := M + 1;
      else
         M := 00 ;
         if H < 23 then
            H := H + 1;
         else
            H := 00;
         end if;
      end if;
   end if;

   Put("Il sera ");
   Put(Hour'Image(H));
   Put("h, ");
   Put(Minute'Image(M));
   Put("mn, ");
   Put(Seconds'Image(S));
   Put("sec .");
end Horloge;
